home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-17 | 1.3 KB | 28 lines | [TEXT/CWIE] |
- /*
-
- LaunchWithSize is a program to demonstrate how to patch the call the LaunchApplication function
- so that you can adjust the size of the memory partition that the application will be opened
- into.
-
- LaunchWithSize does this by patching the call to Get1Resource (which is how LaunchApplication
- reads the SIZE resource of the application being launched), looking for a resource of type
- 'SIZE' and once it finds one, it replaces the old prefered memory value stored in the 'SIZE'
- resource with a value hard coded in LaunchWithSize.
-
- You will want to increase its flexibility by calculating the size you want to set, but this
- is a simple sample showing how to do the patching.
-
- This is useful primarly for multimedia developers who have applications on a CD where the SIZE
- resource cannot be changed.
-
- LaunchFodder is an application that just calls MacsBug with the 'procinfo' dcmd to show what
- it's current memory partion is. If you launch LaunchFodder by itself you should see the value
- 0x0000C800 reported as its size. If you launch LaunchWithSize, which launches LaunchFodder
- after doing a runtime adjustment of LaunchFodder's SIZE resource you should see the value
- 0x00100000 reported as its size.
-
- As always we welcome your comments and feedback.
-
- Pete Gontier gurgle@apple.com
- Mark Cookson mcookson@apple.com
- */